package com.mall.cart.server.config;

import com.alipay.easysdk.kernel.Config;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class AliConfig {
    @Bean
    public  Config getConfig() {
        Config config = new Config();
        config.protocol = "https";
        config.gatewayHost = "openapi-sandbox.dl.alipaydev.com";
        config.signType = "RSA2";
        config.appId = "9021000140633322";
        // 为避免私钥随源码泄露，推荐从文件中读取私钥字符串而不是写入源码中
        config.merchantPrivateKey = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCYWDdMCj+JWeIDOT9aOH1VAWYRIFc7gKyzjt4hj25MTPPVzLY91BQUECteCzwMB+34HP2PmRZCnBneJlPZzn0kJy2tjhhlTb2YJFYWkJC7TV0KCGSDkJoSgcwqqDUem/ve3+yt6cIFnsdI3A3SwMwQV41eZ+L5BBTspkhXcjhgrkGWTDyVWsPs/+H4HYx/0QBoG6YWrdJ9pJYCBNIxDrQeskmvQtXwL+KSPSfNYGl2LG4GJcX0E8hFSKi8+khU8G71gAkvRcV2T5NC4LaVWhCoIY06mCcxEeEEZuSo2RcSrDXJFTmFWNepKz5JC+pbtthx67iDaS6OlnjKj6J169t5AgMBAAECggEAX7mupV0bJ1cPKS9jm3E7b5p9Y+2KYp0r53eyJCxYBiGkZYdIS/li1GiEl4c/p9+jq++rc/uhfSFRL8GtloKlJ35muVM8CQucQmkynuMfzlGCULeNUQ4fgdmFTJh9KEqjLRxPP8hOXfGzDxkWpoL2tp4M+nEUsZva+ghSFIB05GohSIDQZvgOAr92hwyEivUPPb++M4gPxu8Q3pCzxm+3WaPahqCsVwtPxexaXgPY4N+kCc58kDXXs82EYHTf6NWWcXW0NBKQ+zbzpejj0dEUX7KSdw4sDEdtn8b4eoBsrcW7sbeW1bFKHlFOnlo28xUnddvTL7nKRmFy1/WSWuUd8QKBgQDWqbVdxd0Olo8NM9opV9OR/ZLzcTxbtlXHQBOi1jWWXGPlTcJVjdZAU8zbjh0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EGZ+G+uw0rUIlxGM2EZ3Sd6tAdUijqo+KVmUhwYBbv+Y/JnNt4/b7Ju+biFYt43Ccah/fKzRFbWjLiKNabzvMDN1ds4q3EIKayCfvVEyNmIBWxU8YNq1hRSQ00+xUTwA4LYuvuob9h9LVt2WcQIDAQAB";
        //可设置异步通知接收服务地址（可选）
        config.notifyUrl = "http://cbredz.natappfree.cc/aliPay/config";
        //可设置AES密钥，调用AES加解密相关接口时需要（可选）
        //config.encryptKey = "<-- 请填写您的AES密钥，例如：aa4BtZ4tspm2wnXLb1ThQA== -->";

        return config;

    }

}
